; $VER: Install BootX v1.0 (1.3.92)
; Script for Installer to install BootX.

	(complete 0)
	(welcome)

; Copy the BootX executable and support files.

	(set BootX_Dest "SYS:Utilities")

	(set BootX_Dest
	  (askdir
	    (prompt "Select the drawer where you want the BootX program "
		    "and its support files to reside.")
	    (help @askdir-help)
	    (default BootX_Dest)
	  )
	)

	(copyfiles
	  (prompt "Select which files to install:")
	  (help @copyfiles-help)
	  (dest BootX_Dest)
	  (choices "BootX" "BootX.Alarm" "BootX.BBLib" "BootX.Brain" "BootX.Recog")
	  (infos)
	  (confirm)
	)

	(complete 70)

; Copy the BootX.doc and BootX.history files.

	(if
	  (askbool
	    (prompt "Do you wish to install the BootX documentation ?")
	    (help @askbool_help)
	    (default 1)
	  )

	  (
	    (set BootX_Doc
	      (askdir
		(prompt "Select the drawer where you want the BootX "
			"documentation to reside.")
		(help @askdir-help)
		(default BootX_Dest)
	      )
	    )

	    (copyfiles
	      (dest BootX_Doc)
	      (choices "BootX.doc" "BootX.history")
	      (infos)
	    )
	  )
	)

	(complete 90)

; This library is necessary for BootX, make sure that they are there.

	(message
	  "The reqtools.library will now be installed.\n\n BootX "
	  "requires this library to run. I will determine "
	  "which KickStart version you are using and then automatically "
	  "install the correct version of the library."
	)

	(if (< (/ (getversion) 65536) 36)
	  (
	    (copylib
	      (source "LIBS/reqtools.library.13")
	      (dest "LIBS:")
	    )
	    (rename "LIBS:reqtools.library.13" "LIBS:reqtools.library")
	  )
	  (
	    (copylib
	      (source "LIBS/reqtools.library.20")
	      (dest "LIBS:")
	    )
	    (rename "LIBS:reqtools.library.20" "LIBS:reqtools.library")
	  )
	)

	(complete 100)

; Cleanup

	(set @default_dest BootX_Dest)
	(exit)
